package net.devkit.core.mail;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * 邮件抽象,表示一个具体的邮件内容
 */
public class MailEntity implements Serializable {


	/**
	 * 
	 */
	private static final long serialVersionUID = -1691074179432092417L;
	private int id; // id
	private Date sendDate; //发送时间
	private String target;//发送目的地

	private HashMap<String, Object> data = new HashMap<String, Object>(5); //为了提供邮件发送时的模板设置,从context格式化过来的map

	public MailEntity() {

	}

	public HashMap<String, Object> getData() {
		return data;
	}
	
	public void putData(String key,Object value){
		data.put(key, value);
	}
	
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}

	public Date getSendDate() {
		return sendDate;
	}

	public void setSendDate(Date sendDate) {
		this.sendDate = sendDate;
	}

}
